home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / nparse32 / form1.fr_ / form1.fr (.txt)
Encoding:
Visual Basic Form  |  1996-07-01  |  24.6 KB  |  620 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H00C0C0C0&
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   3420
  7.    ClientLeft      =   2490
  8.    ClientTop       =   3285
  9.    ClientWidth     =   6540
  10.    BeginProperty Font 
  11.       name            =   "MS Sans Serif"
  12.       charset         =   0
  13.       weight          =   700
  14.       size            =   8.25
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    ForeColor       =   &H80000008&
  20.    Height          =   3825
  21.    Left            =   2430
  22.    LinkTopic       =   "Form1"
  23.    ScaleHeight     =   3420
  24.    ScaleWidth      =   6540
  25.    Top             =   2940
  26.    Width           =   6660
  27.    Begin VB.CommandButton Command4 
  28.       Caption         =   "Help File"
  29.       BeginProperty Font 
  30.          name            =   "MS Sans Serif"
  31.          charset         =   0
  32.          weight          =   400
  33.          size            =   8.25
  34.          underline       =   0   'False
  35.          italic          =   0   'False
  36.          strikethrough   =   0   'False
  37.       EndProperty
  38.       Height          =   375
  39.       Left            =   5175
  40.       TabIndex        =   17
  41.       Top             =   1080
  42.       Width           =   1200
  43.    End
  44.    Begin VB.TextBox Text3 
  45.       Appearance      =   0  'Flat
  46.       BeginProperty Font 
  47.          name            =   "MS Sans Serif"
  48.          charset         =   0
  49.          weight          =   400
  50.          size            =   8.25
  51.          underline       =   0   'False
  52.          italic          =   0   'False
  53.          strikethrough   =   0   'False
  54.       EndProperty
  55.       Height          =   330
  56.       Left            =   1455
  57.       TabIndex        =   14
  58.       Text            =   """This is text"", to parse"
  59.       Top             =   2835
  60.       Width           =   3285
  61.    End
  62.    Begin VB.CommandButton Command3 
  63.       Appearance      =   0  'Flat
  64.       BackColor       =   &H80000005&
  65.       Caption         =   "Parse Immediate"
  66.       BeginProperty Font 
  67.          name            =   "MS Sans Serif"
  68.          charset         =   0
  69.          weight          =   400
  70.          size            =   8.25
  71.          underline       =   0   'False
  72.          italic          =   0   'False
  73.          strikethrough   =   0   'False
  74.       EndProperty
  75.       Height          =   360
  76.       Left            =   4875
  77.       TabIndex        =   13
  78.       Top             =   2805
  79.       Width           =   1530
  80.    End
  81.    Begin VB.Frame Frame2 
  82.       Caption         =   "Quotes"
  83.       BeginProperty Font 
  84.          name            =   "MS Sans Serif"
  85.          charset         =   0
  86.          weight          =   400
  87.          size            =   8.25
  88.          underline       =   0   'False
  89.          italic          =   0   'False
  90.          strikethrough   =   0   'False
  91.       EndProperty
  92.       Height          =   960
  93.       Left            =   105
  94.       TabIndex        =   8
  95.       Top             =   915
  96.       Width           =   1770
  97.       Begin VB.CheckBox Check1 
  98.          Caption         =   "Pair Quotes"
  99.          BeginProperty Font 
  100.             name            =   "MS Sans Serif"
  101.             charset         =   0
  102.             weight          =   400
  103.             size            =   8.25
  104.             underline       =   0   'False
  105.             italic          =   0   'False
  106.             strikethrough   =   0   'False
  107.          EndProperty
  108.          Height          =   315
  109.          Left            =   135
  110.          TabIndex        =   10
  111.          Top             =   255
  112.          Value           =   1  'Checked
  113.          Width           =   1335
  114.       End
  115.       Begin VB.CheckBox Check2 
  116.          Caption         =   "Trim Quotes"
  117.          BeginProperty Font 
  118.             name            =   "MS Sans Serif"
  119.             charset         =   0
  120.             weight          =   400
  121.             size            =   8.25
  122.             underline       =   0   'False
  123.             italic          =   0   'False
  124.             strikethrough   =   0   'False
  125.          EndProperty
  126.          Height          =   345
  127.          Left            =   135
  128.          TabIndex        =   9
  129.          Top             =   540
  130.          Value           =   1  'Checked
  131.          Width           =   1380
  132.       End
  133.    End
  134.    Begin VB.Frame Frame1 
  135.       Caption         =   "Case"
  136.       BeginProperty Font 
  137.          name            =   "MS Sans Serif"
  138.          charset         =   0
  139.          weight          =   400
  140.          size            =   8.25
  141.          underline       =   0   'False
  142.          italic          =   0   'False
  143.          strikethrough   =   0   'False
  144.       EndProperty
  145.       Height          =   1260
  146.       Left            =   2250
  147.       TabIndex        =   4
  148.       Top             =   900
  149.       Width           =   1650
  150.       Begin VB.OptionButton Option1 
  151.          Caption         =   "Lower"
  152.          BeginProperty Font 
  153.             name            =   "MS Sans Serif"
  154.             charset         =   0
  155.             weight          =   400
  156.             size            =   8.25
  157.             underline       =   0   'False
  158.             italic          =   0   'False
  159.             strikethrough   =   0   'False
  160.          EndProperty
  161.          Height          =   315
  162.          Index           =   2
  163.          Left            =   75
  164.          TabIndex        =   7
  165.          Top             =   855
  166.          Width           =   1095
  167.       End
  168.       Begin VB.OptionButton Option1 
  169.          Caption         =   "Upper"
  170.          BeginProperty Font 
  171.             name            =   "MS Sans Serif"
  172.             charset         =   0
  173.             weight          =   400
  174.             size            =   8.25
  175.             underline       =   0   'False
  176.             italic          =   0   'False
  177.             strikethrough   =   0   'False
  178.          EndProperty
  179.          Height          =   315
  180.          Index           =   1
  181.          Left            =   75
  182.          TabIndex        =   6
  183.          Top             =   555
  184.          Width           =   1095
  185.       End
  186.       Begin VB.OptionButton Option1 
  187.          Caption         =   "Don't Convert"
  188.          BeginProperty Font 
  189.             name            =   "MS Sans Serif"
  190.             charset         =   0
  191.             weight          =   400
  192.             size            =   8.25
  193.             underline       =   0   'False
  194.             italic          =   0   'False
  195.             strikethrough   =   0   'False
  196.          EndProperty
  197.          Height          =   315
  198.          Index           =   0
  199.          Left            =   75
  200.          TabIndex        =   5
  201.          Top             =   255
  202.          Value           =   -1  'True
  203.          Width           =   1395
  204.       End
  205.    End
  206.    Begin VB.TextBox Text2 
  207.       Appearance      =   0  'Flat
  208.       BeginProperty Font 
  209.          name            =   "MS Sans Serif"
  210.          charset         =   0
  211.          weight          =   400
  212.          size            =   8.25
  213.          underline       =   0   'False
  214.          italic          =   0   'False
  215.          strikethrough   =   0   'False
  216.       EndProperty
  217.       Height          =   300
  218.       Left            =   1065
  219.       TabIndex        =   3
  220.       Text            =   "C:\NParse32\readme.txt"
  221.       Top             =   135
  222.       Width           =   3255
  223.    End
  224.    Begin VB.TextBox Text1 
  225.       Appearance      =   0  'Flat
  226.       BeginProperty Font 
  227.          name            =   "MS Sans Serif"
  228.          charset         =   0
  229.          weight          =   400
  230.          size            =   8.25
  231.          underline       =   0   'False
  232.          italic          =   0   'False
  233.          strikethrough   =   0   'False
  234.       EndProperty
  235.       Height          =   285
  236.       Left            =   1065
  237.       TabIndex        =   2
  238.       Text            =   ","
  239.       Top             =   480
  240.       Width           =   945
  241.    End
  242.    Begin VB.CommandButton Command2 
  243.       Appearance      =   0  'Flat
  244.       BackColor       =   &H80000005&
  245.       Caption         =   "Stop Parse"
  246.       BeginProperty Font 
  247.          name            =   "MS Sans Serif"
  248.          charset         =   0
  249.          weight          =   400
  250.          size            =   8.25
  251.          underline       =   0   'False
  252.          italic          =   0   'False
  253.          strikethrough   =   0   'False
  254.       EndProperty
  255.       Height          =   375
  256.       Left            =   5175
  257.       TabIndex        =   1
  258.       Top             =   600
  259.       Width           =   1200
  260.    End
  261.    Begin VB.CommandButton Command1 
  262.       Appearance      =   0  'Flat
  263.       BackColor       =   &H80000005&
  264.       Caption         =   "Parse"
  265.       BeginProperty Font 
  266.          name            =   "MS Sans Serif"
  267.          charset         =   0
  268.          weight          =   400
  269.          size            =   8.25
  270.          underline       =   0   'False
  271.          italic          =   0   'False
  272.          strikethrough   =   0   'False
  273.       EndProperty
  274.       Height          =   375
  275.       Left            =   5175
  276.       TabIndex        =   0
  277.       Top             =   135
  278.       Width           =   1200
  279.    End
  280.    Begin NPARSE32Lib.NParse32 NParse321 
  281.       Left            =   4260
  282.       Top             =   1140
  283.       _Version        =   65536
  284.       _ExtentX        =   926
  285.       _ExtentY        =   1005
  286.       _StockProps     =   0
  287.    End
  288.    Begin VB.Label Label4 
  289.       Alignment       =   2  'Center
  290.       Appearance      =   0  'Flat
  291.       BackColor       =   &H00C0C0C0&
  292.       Caption         =   "Click ""Parse Immediate"" to parse the text in the ""Immediate Text"" box"
  293.       BeginProperty Font 
  294.          name            =   "MS Sans Serif"
  295.          charset         =   0
  296.          weight          =   400
  297.          size            =   8.25
  298.          underline       =   0   'False
  299.          italic          =   0   'False
  300.          strikethrough   =   0   'False
  301.       EndProperty
  302.       ForeColor       =   &H80000008&
  303.       Height          =   330
  304.       Left            =   60
  305.       TabIndex        =   16
  306.       Top             =   2475
  307.       Width           =   6075
  308.    End
  309.    Begin VB.Line Line1 
  310.       X1              =   30
  311.       X2              =   6510
  312.       Y1              =   2355
  313.       Y2              =   2355
  314.    End
  315.    Begin VB.Label Label3 
  316.       Appearance      =   0  'Flat
  317.       BackColor       =   &H00C0C0C0&
  318.       Caption         =   "Immediate Text:"
  319.       BeginProperty Font 
  320.          name            =   "MS Sans Serif"
  321.          charset         =   0
  322.          weight          =   400
  323.          size            =   8.25
  324.          underline       =   0   'False
  325.          italic          =   0   'False
  326.          strikethrough   =   0   'False
  327.       EndProperty
  328.       ForeColor       =   &H80000008&
  329.       Height          =   300
  330.       Left            =   75
  331.       TabIndex        =   15
  332.       Top             =   2880
  333.       Width           =   1275
  334.    End
  335.    Begin VB.Label Label2 
  336.       Appearance      =   0  'Flat
  337.       BackColor       =   &H00C0C0C0&
  338.       Caption         =   "Delimiter:"
  339.       BeginProperty Font 
  340.          name            =   "MS Sans Serif"
  341.          charset         =   0
  342.          weight          =   400
  343.          size            =   8.25
  344.          underline       =   0   'False
  345.          italic          =   0   'False
  346.          strikethrough   =   0   'False
  347.       EndProperty
  348.       ForeColor       =   &H80000008&
  349.       Height          =   300
  350.       Left            =   75
  351.       TabIndex        =   12
  352.       Top             =   495
  353.       Width           =   915
  354.    End
  355.    Begin VB.Label Label1 
  356.       Appearance      =   0  'Flat
  357.       BackColor       =   &H00C0C0C0&
  358.       Caption         =   "Filename:"
  359.       BeginProperty Font 
  360.          name            =   "MS Sans Serif"
  361.          charset         =   0
  362.          weight          =   400
  363.          size            =   8.25
  364.          underline       =   0   'False
  365.          italic          =   0   'False
  366.          strikethrough   =   0   'False
  367.       EndProperty
  368.       ForeColor       =   &H80000008&
  369.       Height          =   300
  370.       Left            =   75
  371.       TabIndex        =   11
  372.       Top             =   165
  373.       Width           =   1020
  374.    End
  375. Attribute VB_Name = "Form1"
  376. Attribute VB_Creatable = False
  377. Attribute VB_Exposed = False
  378. Option Explicit
  379. '-----------------------------------------------------------------------------------------
  380. ' This sample code may be copied for use in your applications,
  381. ' however Nanoware, Inc. makes no warranty as to the completeness
  382. ' or fitness for a particular purpose that this code provides, it
  383. 'is merely a simple learning tool.
  384. '-----------------------------------------------------------------------------------------
  385. '--------------------------
  386. 'The following is a list of constants used by NParse32.   We suggest cutting
  387. 'and pasting the constants into either a module or form declaration area in your
  388. 'application instead of hardcoding the values.  It makes for more readable and
  389. 'maintainable code.
  390. '--------------------------
  391. 'NErr Constants
  392. Const NOERRORS = 0                                          '//no error for err property
  393. Const FILEOPENFAILURE = 1                           '//failed to open the input file
  394. Const FILENOTOPENFAILURE = 2                  '//attempting to parse a file that is not open
  395. Const FILEALREADYOPENFAILURE = 3       '//attempting open a file when already opened
  396. Const NONREENTRANT = 4                              '// changed filename at the wrong time
  397. Const INVALIDFIELDINDEX = 5                       '//attempted to get a field that doesn't exist in record
  398. Const INVALIDPOSITIONOFFSET = 6             '//attempted to set file pointer outside of file range
  399. Const MEMORYALLOCATIONERROR = 7     '//could not allocate temporary memory
  400. 'Case Constants
  401. Const DONTCONVERTCASE = 0                       '//don
  402. t convert input to either upper or lower case
  403. Const CONVERTTOUPPERCASE = 1                '//convert inputs to uppercase
  404. Const CONVERTTOLOWERCASE = 2              '//convert inputs to lower case
  405. 'Proc Constants
  406. Const STARTPARSE = 1                                     '//init parser, fire start event
  407. Const STOPPARSE = 2                                         '//stop parsing, fire end event
  408. 'Misc Constants
  409. Const NOPROCESS = -1                                        '//default - proc property is not in use yet
  410. 'the following is for shelling out to another application
  411. Const SW_SHOWNORMAL = 1
  412. Private Declare Function ShellExecute Lib _
  413.             "shell32.dll" Alias "ShellExecuteA" _
  414.             (ByVal hwnd As Long, _
  415.             ByVal lpOperation As String, _
  416.             ByVal lpFile As String, _
  417.             ByVal lpParameters As String, _
  418.             ByVal lpDirectory As String, _
  419.             ByVal nShowCmd As Long) As Long
  420. Private Sub Command1_Click()
  421. '-----------------------------------------------------------------------------------------
  422. ' This sample code may be copied for use in your applications,
  423. ' however Nanoware, Inc. makes no warranty as to the completeness
  424. ' or fitness for a particular purpose that this code provides, it
  425. 'is merely a simple learning tool.
  426. '-----------------------------------------------------------------------------------------
  427. 'This routine is used to start the parsing process on a file.
  428. 'first, disable the Immediate parse button so that user cannot
  429. 'attempt to do an immediate parse while a potentially long file
  430. 'parse is in progress.
  431. Command3.Enabled = False                'disable the immediate parse for the duration
  432. Form2.Show    'make sure output form is open
  433. 'next, read in the options that have been selected
  434. NParse321.NPFilename = Text2.Text        'get the filename
  435. NParse321.Delim = Text1.Text                    'get the delimiters
  436. NParse321.PairQuotes = Check1.Value    'do we want to pair quotes?
  437. NParse321.TrimQuotes = Check2.Value    'do we want to trim off quotes?
  438. If Option1(1).Value = True Then              'convert case as requested
  439.     NParse321.Case = CONVERTTOUPPERCASE
  440.     If Option1(2).Value = True Then
  441.         NParse321.Case = CONVERTTOLOWERCASE
  442.     Else
  443.         NParse321.Case = DONTCONVERTCASE
  444.     End If
  445. End If
  446. 'OK, Now let'er rip!
  447. NParse321.Proc = STARTPARSE            'tell it to start
  448. End Sub
  449. Private Sub Command2_Click()
  450. '-----------------------------------------------------------------------------------------
  451. ' This sample code may be copied for use in your applications,
  452. ' however Nanoware, Inc. makes no warranty as to the completeness
  453. ' or fitness for a particular purpose that this code provides, it
  454. 'is merely a simple learning tool.
  455. '-----------------------------------------------------------------------------------------
  456. 'This code is used to halt a parse that is in progress.
  457. NParse321.Proc = STOPPARSE     'halt the parse
  458. End Sub
  459. Private Sub Command3_Click()
  460. '-----------------------------------------------------------------------------------------
  461. ' This sample code may be copied for use in your applications,
  462. ' however Nanoware, Inc. makes no warranty as to the completeness
  463. ' or fitness for a particular purpose that this code provides, it
  464. 'is merely a simple learning tool.
  465. '-----------------------------------------------------------------------------------------
  466. 'This routine is used parse a single text string.
  467. Dim lMyNumberOfFields As Long
  468. Dim I As Long
  469. Dim sMyField  As String
  470. 'first, disable the Parse button so that user cannot
  471. 'attempt to parse a file while an immediate parse is running
  472. Command1.Enabled = False                'disable "Parse"
  473. Command2.Enabled = False                'disable "Stop"
  474. 'next, read in the options that have been selected
  475. NParse321.Delim = Text1.Text         'get the delimiters
  476. NParse321.PairQuotes = Check1.Value    'do we want to pair quotes?
  477. NParse321.TrimQuotes = Check2.Value    'do we want to trim off quotes?
  478. If Option1(1).Value = True Then         'convert case as requested
  479.     NParse321.Case = CONVERTTOUPPERCASE
  480.     If Option1(2).Value = True Then
  481.         NParse321.Case = CONVERTTOLOWERCASE
  482.     Else
  483.         NParse321.Case = DONTCONVERTCASE
  484.     End If
  485. End If
  486. Form2.Show          'make sure form 2 is displayed
  487. Form2.Text1.Text = ""   'clear out any existing text in the output box
  488. 'OK, Set the text to make parser parse it.
  489. NParse321.NPRecord = Text3.Text          ' give the parse control some text
  490.  'Determine how many fields there were in the current record
  491.  lMyNumberOfFields = NParse321.NumFlds()
  492.                                  
  493.  'now start displaying output
  494.  Form2.Text1.Text = Form2.Text1.Text & "Immediate String Parse" & Chr$(13) & Chr$(10)
  495. 'print out the number of fields in this record
  496.  Form2.Text1.Text = Form2.Text1.Text & "NumFields: " & CStr(lMyNumberOfFields) & Chr$(13) & Chr$(10)
  497. 'output the whole record
  498. Form2.Text1.Text = Form2.Text1.Text & "NPRecord: " & NParse321.NPRecord & Chr$(13) & Chr$(10)
  499. 'Next loop through each field and output the values
  500. For I = 0 To (lMyNumberOfFields - 1)      'NumFlds is ones-based
  501.         sMyField = NParse321.Fld(I)        'get the field
  502.         Form2.Text1.Text = Form2.Text1.Text & "FN: " & CStr(I) & "   Value: " & sMyField & Chr$(13) & Chr$(10)
  503. Next I
  504. DoEvents  'allow the display to update
  505. Command1.Enabled = True         'enable "Parse"
  506. Command2.Enabled = True         'enable "Stop"
  507. End Sub
  508. Private Sub Command4_Click()
  509. Dim iRet As Long
  510. Dim vbNullString As String
  511. Dim SrcDirectory As String
  512. SrcDirectory = App.Path & "\" & "Nphlp1.hlp"
  513. iRet = ShellExecute(Me.hwnd, _
  514.         vbNullString, _
  515.         SrcDirectory, _
  516.         vbNullString, _
  517.         "c:\", _
  518.         SW_SHOWNORMAL)
  519.         
  520. If iRet < 33 Then
  521.         MsgBox "Unable To Open Help File"
  522. End If
  523. End Sub
  524. Private Sub Form_Load()
  525. '-----------------------------------------------------------------------------------------
  526. ' This sample code may be copied for use in your applications,
  527. ' however Nanoware, Inc. makes no warranty as to the completeness
  528. ' or fitness for a particular purpose that this code provides, it
  529. 'is merely a simple learning tool.
  530. '-----------------------------------------------------------------------------------------
  531. Form2.Show   'load the output form
  532. DoEvents
  533. End Sub
  534. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  535. Unload Form2
  536. End Sub
  537. Private Sub NParse321_NPErr()
  538. '-----------------------------------------------------------------------------------------
  539. ' This sample code may be copied for use in your applications,
  540. ' however Nanoware, Inc. makes no warranty as to the completeness
  541. ' or fitness for a particular purpose that this code provides, it
  542. 'is merely a simple learning tool.
  543. '-----------------------------------------------------------------------------------------
  544. MsgBox CStr(NParse321.NErr)
  545. End Sub
  546. Private Sub NParse321_Parse()
  547. '-----------------------------------------------------------------------------------------
  548. ' This sample code may be copied for use in your applications,
  549. ' however Nanoware, Inc. makes no warranty as to the completeness
  550. ' or fitness for a particular purpose that this code provides, it
  551. 'is merely a simple learning tool.
  552. '-----------------------------------------------------------------------------------------
  553. 'This event is fired when NParse32 has finished parsing a
  554. 'record.  You should put the code that retrieves the parsed
  555. 'data here.
  556. Dim lMyNumberOfFields As Long
  557. Dim I As Long
  558. Dim sMyField As String
  559. Dim lMyRecordNumber As Long
  560.  lMyRecordNumber = NParse321.RecNum       'get the record number
  561.                                               
  562. If ((lMyRecordNumber Mod 5) = 0) Then   'every so often, clean up the display so the text string doesn't get too long
  563.      Form2.Text1.Text = ""
  564. End If
  565.  'Determine how many fields there were in the current record
  566.   lMyNumberOfFields = NParse321.NumFlds()
  567.         
  568.  'Now Print out the record number
  569. Form2.Text1.Text = Form2.Text1.Text & "RecNum: " & CStr(lMyRecordNumber) & Chr$(13) & Chr$(10)
  570.            
  571.  'now print out the byte offset
  572. Form2.Text1.Text = Form2.Text1.Text & "Position: " & CStr(NParse321.Position) & Chr$(13) & Chr$(10)
  573. 'print out the number of fields in this record
  574.  Form2.Text1.Text = Form2.Text1.Text & "NumFields: " & CStr(lMyNumberOfFields) & Chr$(13) & Chr$(10)
  575. 'output the whole record
  576. Form2.Text1.Text = Form2.Text1.Text & "NPRecord: " & NParse321.NPRecord & Chr$(13) & Chr$(10)
  577. 'Next loop through each field and output the values
  578. For I = 0 To (lMyNumberOfFields - 1)      'NumFlds is ones-based
  579.         sMyField = NParse321.Fld(I)         'get the field
  580.         Form2.Text1.Text = Form2.Text1.Text & "FN: " & CStr(I) & "   Value: " & sMyField & Chr$(13) & Chr$(10)
  581. Next I
  582. 'add a blank line for separation
  583. Form2.Text1.Text = Form2.Text1.Text & Chr$(13) & Chr$(10)
  584. DoEvents
  585. End Sub
  586. Private Sub NParse321_Start()
  587. '-----------------------------------------------------------------------------------------
  588. ' This sample code may be copied for use in your applications,
  589. ' however Nanoware, Inc. makes no warranty as to the completeness
  590. ' or fitness for a particular purpose that this code provides, it
  591. 'is merely a simple learning tool.
  592. '-----------------------------------------------------------------------------------------
  593. 'This event is fired when the NParse32 control is first
  594. 'told to go parse a file.  This is where you should put any
  595. 'initialization stuff (like counters, etc.)
  596. 'Put initialization code here
  597. Form2.Text1.Text = "" 'clear the output box.
  598. 'first, disable the Immediate parse button so that user cannot
  599. 'attempt to do an immediate parse while a potentially long file
  600. 'parse is in progress.
  601. Command1.Enabled = False                'disable the file parse for the duration
  602. Command3.Enabled = False                'disable the immediate parse for the duration
  603. End Sub
  604. Private Sub NParse321_Stop()
  605. '-----------------------------------------------------------------------------------------
  606. ' This sample code may be copied for use in your applications,
  607. ' however Nanoware, Inc. makes no warranty as to the completeness
  608. ' or fitness for a particular purpose that this code provides, it
  609. 'is merely a simple learning tool.
  610. '-----------------------------------------------------------------------------------------
  611. 'This event is called when the parse is complete, either
  612. 'because user application stopped it or we have reached the
  613. 'end of the input file.
  614. 'Put your cleanup code here.
  615. Command3.Enabled = True         'enable Immediate
  616. Command1.Enabled = True         'enable "Parse"
  617. Command2.Enabled = True         'enable "Stop"
  618. 'MsgBox "Stop fired"
  619. End Sub
  620.